package com.xkstream.client.api.kt

import com.xkstream.client.api.API
import com.xkstream.client.base.BaseData
import com.xkstream.client.entity.kt.BlogListData
import com.xkstream.client.entity.kt.CommentListData
import io.reactivex.Observable
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST
import java.util.*

/**
 * Created by xiaoyi on 2017-11-4.
 */
interface MyZoneService {
    /**
     * 空间列表
     */
    @FormUrlEncoded
    @POST(API.BLOG_LIST)
    fun getBlogList(@FieldMap params: Map<String, String>): Observable<BaseData<BlogListData>>

    /**
     * 评论列表
     */
    @FormUrlEncoded
    @POST(API.COMMENT_LIST)
    fun getCommentList(@FieldMap params: Map<String, String>): Observable<BaseData<CommentListData?>>

    /**
     * 发布说说
     */
    @FormUrlEncoded
    @POST(API.PUBLISH_BLOG)
    fun publishBlog(@FieldMap params: Map<String, String>): Observable<BaseData<Any?>>

    /**
     * 发布评论
     */
    @FormUrlEncoded
    @POST(API.PUBLISH_COMMENT)
    fun publishComment(@FieldMap params: Map<String, String>): Observable<BaseData<Any?>>

    /**
     * 点赞
     */
    @FormUrlEncoded
    @POST(API.UP_VOTE)
    fun blogUpVote(@FieldMap params: Map<String, String>): Observable<BaseData<Any?>>

    /**
     * 删除博客
     */
    @FormUrlEncoded
    @POST(API.DELETE_BLOG)
    fun deleteBlog(@FieldMap params: Map<String, String>): Observable<BaseData<Any?>>

    /**
     * 设置空间背景
     */
    @FormUrlEncoded
    @POST(API.SET_ZONE_BG)
    fun setZoneBg(@FieldMap params: Map<String, String>): Observable<BaseData<Any?>>


}